<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:h="http://java.sun.com/jsf/html">
    <body>
        <ui:composition template="/template.xhtml">

            <ui:define name="right">

            </ui:define>

            <ui:define name="center">
                <h2>#{bundle.DeletePlatformTitle}</h2>


                <p:panel header="#{bundle.ListPlatformTitle}"> 
                    <h:form id="form">  

                        <p:dataTable id="platforms" var="localPlatform" value="#{platformController.platformList}" 
                                     rowKey="#{platform.id}"  paginator="true" rows="10" 
                                     rowStyleClass="lista" styleClass="lista"
                                     emptyMessage="nessuna piattaforma nel database" > 

                            <p:column headerText="#{bundle.ListPlatformTitle_name}" 
                                      filterBy="#{localPlatform.title}" filterMatchMode="contains">  
                                <h:outputText value="#{localPlatform.title}" />  
                            </p:column> 

                            <p:column headerText="#{bundle.ListPlatformTitle_type}" 
                                      filterBy="#{localPlatform.typePlatform.name}" filterMatchMode="contains" >  
                                <h:outputText value="#{localPlatform.typePlatform.name}" /> 
                            </p:column> 

                            <p:column headerText="#{bundle.ListPlatformTitle_organismName}" 
                                      filterBy="#{localPlatform.organism.name}" filterMatchMode="contains">  
                                <h:outputText value="#{localPlatform.organism.name}" /> 
                            </p:column> 

                            <p:column >  
                                <h:panelGrid columns="3" cellpadding="2">  
                                    <p:commandButton action="deleteConfirm" image="ui-icon ui-icon-close" ajax="false" title="Delete">  
                                        <f:setPropertyActionListener target="#{platformController.platform}" value="#{localPlatform}"  />  
                                    </p:commandButton> 
                                </h:panelGrid>  
                            </p:column>

                        </p:dataTable> 
                        
                    </h:form>  
                </p:panel>

            </ui:define>
        </ui:composition>

    </body>
</html>
